﻿using Architecture.Domain.Service;
using Architeture.Domain.DTO;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand.Goods;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler.Goods
{
    public class EnterSelectdtoCommandHandler : IRequestHandler<EnterSelectdtoCommand, List<EnterDTO>>
    {
        protected readonly IEnterpriseService service;

        public EnterSelectdtoCommandHandler(IEnterpriseService service)
        {
            this.service = service;
        }

        public async Task<List<EnterDTO>> Handle(EnterSelectdtoCommand request, CancellationToken cancellationToken)
        {
            return await service.GetEnterDTO(request.id);
        }
    }
}
